#!/bin/sh
echo -n "Do you want to describe your commit [y/N]?"
read -k 1 CONFIRM
# echo "confirm is $CONFIRM"

case $CONFIRM in
	Y|y)
		echo -n -e "\nInput your commit description:"
		read Des;;
	*)
		Des=1;;
esac

if [ $Des -eq 1 ]
then
	config commit -m "auto backup ibus config($(date +%F))"
else
	config commit -m "$Des"
fi

config push origin master
echo "Your ibus data backup complete"

